import useTable from './useTable'
import { useColumnSettingStore } from '@/store/columnSetting'

const columnSettingStore = useColumnSettingStore()

export default function useTableStore(proxy, options) {
  options.table.columns = columnSettingStore[options.table.columnStoreKey]
  options.table.persist = (val) => {
    console.log(options.table.columnStoreKey, val)
    columnSettingStore.setVal(options.table.columnStoreKey, val)
  }
  return useTable(proxy, options)
}
